import { computed, ref } from 'vue'
import { EnumAllViewType } from '@renderer/views/imgViewer/imgTypes'

export const useViewerStatus = (viewType: EnumAllViewType) => {
  let viewStatusRef = ref()
  if (viewType === EnumAllViewType.stack) {
    viewStatusRef.value = {
      horFlip: false,
      verFlip: false
    }
  } else {
    viewStatusRef.value = {
      [EnumAllViewType.ax]: {
        horFlip: false,
        verFlip: false
      },
      [EnumAllViewType.sag]: {
        horFlip: false,
        verFlip: false
      },
      [EnumAllViewType.cor]: {
        horFlip: false,
        verFlip: false
      }
    }
  }
  return {
    viewStatusRef
  }
}
